//
//  StringConst.swift
//  QianPing
//
//  Created by yanglipeng on 2018/12/14.
//  Copyright © 2018 yanglipeng. All rights reserved.
//

import Foundation
//服务器
struct BaseURL {
    static var BaseTest = "http://new.qianpingapp.com"
    static var LoginTest = "http://new.qianpingapp.com"

    static var BaseOfficial = "http://new.qianpingapp.com"
    static var LoginOfficial = "http://new.qianpingapp.com"
}
//控制打印
struct logConfig {
    static var request = true
    static var response = true
    static var responselist = true
}
/// 常量字符串
struct ConstString {
    static var Token = "Qianping_Token"
    
}

/// 常量数字
struct ConstNumber {
    static var LoginTemplateId = 251156
}

// MARK: - 常量字符串 通知名
extension Notification.Name {
    
    /// 播放器状态改变
    static let PlayerViewPlayStateChange = Notification.Name("PlayerViewPlayStateChange")
    
}
//封装的日志输出功能
func QPLog(_ input: Any..., file: String = #file, function: String = #function, line: Int = #line) {
    #if DEBUG
    //获取文件名
    let fileName = (file as NSString).lastPathComponent
    
    var log = ""
    
    for argv in input {
        log += "\t\(argv)\n"
    }
    
    //打印日志内容
    print("""
        [Place:] \(fileName) (\(line)) - \(function) (\(Date().formatString("HH:mm:ss")))
        [Log:]
        \(log)
        """)
    
    #endif
}
